import Koa from 'koa'
import { port } from './config/settting.js'
import { rot } from './router/index.js'
import {getData} from './db/index.js'
import bodyParser from 'koa-bodyparser'
import cors from 'koa-cors'


let app = new Koa()

app.use(bodyParser())
// getData()
app.use(cors())
app.use(rot)
app.listen(port, () => {
    console.log('Server is running http://localhost:5000');

})